package chapter1

import "fmt"

type print interface {
	output(s string)
}

type user struct {
	name string
	age int
}

func (u *user)output(s string)  {
	fmt.Println(u.name+s)
}


func Test2()  {
	u:=user{
		name: "wang",
		age: 10,
	}
	var f print
	f=&u
	f.output("ww")

}